package com.atguigu.aiproject.vo;

import lombok.Data;

import java.time.LocalDateTime;
import java.util.UUID;

@Data
public class MailMessageVO {
    private String toEmail;
    private String nicknames;// 可能为多个昵称
    private String subject;
    private String content;
    // 用于持久化
    private Integer userId;
    private LocalDateTime createTime;
    private String messageId; // 用于消息确认

    public MailMessageVO(String toEmail, String nicknames, String subject, String content, Integer userId) {
        this.toEmail = toEmail;
        this.nicknames = nicknames;
        this.subject = subject;
        this.content = content;
        this.userId = userId;
        this.createTime = LocalDateTime.now();
        this.messageId = UUID.randomUUID().toString();
    }
}
